package cn.virens.utils;

import java.io.IOException;

import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

public class ResourceUtil {
	public static Resource getResource(String location) {
		return resolver().getResource(location);
	}

	public static Resource[] getResources(String locationPattern) throws IOException {
		return resolver().getResources(locationPattern);
	}

	public static PathMatchingResourcePatternResolver resolver() {
		return new PathMatchingResourcePatternResolver();
	}
}
